{extend name="default/base/base_seller" /}
{block name="seller_main"}

<style>
    .bill-alert-block {
        padding-bottom: 14px;
        padding-top: 14px;
    }
    .bill_alert {
        background-color: #F9FAFC;
        border: 1px solid #F1F1F1;
        margin-bottom: 20px;
        padding: 8px 35px 8px 14px;
        text-shadow: 0 1px 0 rgba(255, 255, 255, 0.5);
        line-height:30px;
    }
</style>
<div class="bill_alert bill-alert-block mt10">
    <div style="width:800px"><h3 style="float:left">{$Think.lang.seller_o2o_order_bill_current_settlement}</h3><div style="float:right;">
            {if $bill_info['o2o_order_bill_state'] == O2O_ORDER_BILL_STATE_CHECK}
            <a class="dssc-btn mt5" ds_type="dialog" dialog_title="{$Think.lang.ds_common_button_confirm}{$Think.lang.seller_o2o_order_bill_current_settlement}" dialog_id="confirm_bill"  uri=" {:url('SellerO2oOrderBill/confirm_bill',['bill_id'=>$bill_info.o2o_order_bill_id])}" dialog_width="550" title="{$Think.lang.ds_common_button_confirm}{$Think.lang.seller_o2o_order_bill_current_settlement}" href="javascript:void(0)">{$Think.lang.seller_o2o_order_bill_current_settlement_correct}</a>
            {elseif $bill_info['o2o_order_bill_state'] == O2O_ORDER_BILL_STATE_PAY /}
            <a class="dssc-btn mt5" ds_type="dialog" dialog_title="{$Think.lang.seller_o2o_order_bill_pay}" dialog_id="pay_bill"  uri=" {:url('SellerO2oOrderBill/pay_bill',['bill_id'=>$bill_info.o2o_order_bill_id])}" dialog_width="550" title="{$Think.lang.seller_o2o_order_bill_pay}" href="javascript:void(0)">{$Think.lang.seller_o2o_order_bill_pay}</a>
            {/if}
        </div>
        <div style="clear:both"></div>
    </div>
    <ul>
        <li>{$Think.lang.seller_o2o_order_bill_circle}：{$bill_info.o2o_order_bill_start_time|date="Y-m-d"} &nbsp;{$Think.lang.seller_o2o_order_bill_to}&nbsp; {$bill_info.o2o_order_bill_end_time|date="Y-m-d"}</li>
        <li>{$Think.lang.seller_o2o_order_bill_addtime}：{$bill_info.o2o_order_bill_addtime|date="Y-m-d"}</li>
        <li>{$Think.lang.seller_o2o_order_bill_current_receivables}：{$bill_info.o2o_order_bill_result_totals} = {$bill_info.o2o_order_bill_fee_totals} ({$Think.lang.seller_o2o_order_bill_fee_totals}) - {$bill_info.o2o_order_bill_complaint_totals} ({$Think.lang.seller_o2o_order_bill_complaint_totals})</li>
        <li>{$Think.lang.seller_o2o_order_bill_o2o_distributor_payment_account}：{$bill_info.o2o_distributor_payment_account}</li>
        <li>{$Think.lang.seller_o2o_order_bill_state}：{$Think.lang.seller_o2o_order_bill_state_text[$bill_info.o2o_order_bill_state]}
        </li>
        {if $bill_info.o2o_order_bill_remark}
            <li><b>{$Think.lang.seller_o2o_order_bill_remark}：{$bill_info.o2o_order_bill_remark}</b>
                </li>
            {/if}
            {if $bill_info.o2o_order_bill_payment_voucher}
            <li><b>{$Think.lang.seller_o2o_order_bill_payment_voucher}：<a href='{:ds_get_pic(ATTACH_STORE."/".$bill_info["store_id"]."/o2o_order_bill",$bill_info["o2o_order_bill_payment_voucher"])}' target="_blank">{$Think.lang.ds_view}</a></b>
                </li>
            {/if}
    </ul>
</div>
<!--区分部分 BEGIN-->















<form method="get" id="formSearch">
    <table class="search-form">
        <input type="hidden" name='type' value='{$Request.param.type}' />
        <tr>
            <td>&nbsp;</td>
            <th>{$Think.lang.seller_o2o_order_bill_order_number}</th>
            <td class="w180"><input type="text" class="text"  value="{$Request.param.query_order_no}" name="query_order_no" /></td>
            <th>{$Think.lang.seller_o2o_order_bill_transaction_time}</th>
            <td class="w180">
                <input type="text" class="text w70" name="query_start_date" id="query_start_date" value="{$Request.param.query_start_date}"/>
                &#8211;
                <input type="text" class="text w70" name="query_end_date" id="query_end_date" value="{$Request.param.query_end_date}"/>
            </td>
            <td class="tc w200">
                <input type="submit" class="submit" value="{$Think.lang.ds_search}" />
            </td>
    </table>
</form>
<table class="dssc-default-table">
    <thead>
        <tr>
            <th class="w10"></th>
            <th>{$Think.lang.seller_o2o_order_bill_order_number}</th>
            <th>{$Think.lang.seller_o2o_order_bill_order_time}</th>
            <th>{$Think.lang.seller_o2o_order_bill_transaction_time}</th>
            <th>{$Think.lang.seller_o2o_order_bill_order_amount}</th>
            <th>{$Think.lang.seller_o2o_order_bill_shipping_fee}</th>
            <th>{$Think.lang.seller_o2o_order_bill_is_complaint}</th>
            <th>{$Think.lang.seller_o2o_order_bill_order_state}</th>
            <th>{$Think.lang.ds_handle}</th>
        </tr>
    </thead>
    <tbody>
        {notempty name="order_list"}
        {foreach name="order_list" item="order_info"  }
        <tr class="bd-line">
            <td></td>
            <td class="w90">{$order_info.order_sn}</td>
            <td>{$order_info.add_time|date="Y-m-d"}</td>
            <td>{$order_info.finnshed_time|date="Y-m-d"}</td>
            <td>{$order_info.order_amount}</td>
            <td>{$order_info.shipping_fee}</td>
            <td>{if $order_info.order_is_complaint}{$Think.lang.ds_yes}{else}{$Think.lang.ds_no}{/if}</td>
            <td>{:get_order_state($order_info)}</td>
            <td>
                <a target="_blank" href="{:url('Sellerorder/show_order',['order_id'=>$order_info.order_id])}">{$Think.lang.ds_view}</a>
            </td>
        </tr>
        {/foreach}
        {else /}
        <tr>
            <td colspan="9" class="norecord"><i>&nbsp;</i><span>{$Think.lang.no_record}</span></td>
        </tr>
        {/notempty}
    </tbody>
    <tfoot>
        {notempty name="order_list"}
        <tr>
            <td colspan="9"><div class="pagination">{$show_page|raw}</div></td>
        </tr>
        {/notempty}
    </tfoot>
</table>








<!--区分部分 END-->
<script type="text/javascript">
    $(document).ready(function () {
        $('#query_start_date').datepicker({dateFormat: 'yy-mm-dd'});
        $('#query_end_date').datepicker({dateFormat: 'yy-mm-dd'});
    });
</script>

{/block}

